The present invention relates to a method for configuring a station connected to a field bus, wherein a logical address is allocated to said station, and in particular to a method of allocating a logical address to such a station.
The invention further relates to a station suited for being connected to a field bus and having means for receiving and evaluating a bus telegram, said station further having a memory for storing a logical address which is to be allocated to said station.
A field bus is a communication system especially used in industrial automation technology for connecting spatially distributed sensors and actuators to higher-order controls and computers. It is a characteristic feature of such a field bus that the different units connected to the field bus are connected one with the other via a collective bus line which allows, at least in principle, any units to communicate one with the other via the field bus, without being individually connected by cables. The units connected to the field bus will be generally referred to as stations hereafter.
With field buses data transmission as such takes place based on fixed rules, known as protocols. With respect to such protocols, two basic kinds of field buses can be distinguished, namely field buses with a so-called message-oriented transmission method on the one hand, and field buses with a so-called I/O-oriented transmission method on the other hand. In case of the first-mentioned transmission method each station is allocated a unique address. For transmitting data from one station to another, the transmitting station adds the address of the receiving station to the data telegram comprising the message to be transmitted, as prescribed by the selected protocol. Being supplemented by that address, the data telegram is then dispatched via the bus line, and the receiving station can recognize from the address allocated to it that the message is intended for it. It is a matter of course that each station must necessarily know the address allocated to it with such message-oriented transmission methods. Usually, the address is assigned to the stations by means of coding switches which must be present in each station, and on which the address assigned to the respective station is preset. The field bus known as CAN bus may be taken as an example of a field bus working with a message-oriented transmission method.
In contrast, an I/O-oriented transmission method does not require allocation of a unique address to each of the different stations, at least not in principle. Rather, communication between stations is effected under control of a higher-order station, known as bus master. The bus master is the only authority capable of initiating data traffic. The bus master has exact knowledge of the structure of the bus, especially the sequence and order of the stations connected to the bus. The bus master transmits an exactly specified data frame that contains as many data fields as stations are connected to the field bus. The data fields of the data frame are circulated from one station to the next and finally back to the bus master. Once the bus master receives the start word of the data frame initiated by itself, i.e. the data frame has been fully circulated through the entire ring structure of stations, it generates a signal that causes all stations to take over the message present at the respective station at the moment of that signal. Consequently, distribution of data to be transmitted to the different stations is established here based on the bus structure known to the bus master, the latter xe2x80x9cfillsxe2x80x9d the data fields of the data frame in an appropriate way. The field bus known as Interbus may serve as a preferred example of a field bus using such a transmission method.
A detailed description of the Interbus is found, for example, in the German book entitled xe2x80x9cInterbusxe2x80x94Grundlagen und Praxis (Fundamentals and Practice)xe2x80x9d by Baginski et al., published by Hxc3xcthig-Verlag, 1998. As a special advantage of the Interbus, this book underlines that no unique addresses are required for data transmission. This also means that there is no need to equip the different stations with coding switches or the like.
For safety-critical processes, such as monitoring of emergency tripping devices, no field bus systems have been used heretofore, since the ideally desired 100% failsafety could not be guaranteed due to their freely accessible structure. It was only recently that it was tried to use field bus systems also in safety-critical applications by means of additional failsafety measures such as additional protocols intended to guarantee failsafety. As part of these safety protocols, addresses are to be assigned also in case of the Interbus, at least to those stations that are involved in safety-critical processes. Said addresses then allow such stations to check if a message received is actually intended for themselves. Errors may occur, for example, if changes are made in the order or the type of the stations actively connected to the Interbus and if the bus master does not get knowledge of such changes quickly enough. This may happen erroneously when a station is exchanged, for example.
For implementing a failsafe Interbus it is therefore a requirement that addresses be allocated to the failsafe stations in a failsafe way. This has been achieved heretofore by providing the stations with a coding switch which is preset in a suitable way to allocate the unique address to the station. Such kind of address will be described hereafter as logical address, because it may be independent of the physical structure of the field bus, and especially of the sequence of the connected stations.
However, use of coding switches for allocating logical addresses causes certain disadvantages. One of such lies in the fact that any coding switch requires mechanically adjustable elements in some form or the other. Mechanical components, however, are comparatively costly in terms of production so that their mass production is expensive compared with purely electronic components. In addition, mechanical components are always subject to wear which prevents to employ simple components, especially in the case of safety-critical applications. A further disadvantage connected with the use of coding switches can be seen in the fact that such switches must always be located near the particular station. For complex process controls in industrial applications, however, the different stations connected to the field bus may be remote one from the other by up to several hundred meters. When coding switches are used, the logical addresses must be allocated in this case at the very location of the station so that in some cases long distances must be overcome that make the setting and configuration laborious and complicated. Finally, such decentralized configuration measures always involve the risk that track may be lost, which may result in erroneous allocations of addresses, especially when a defective station is exchanged.
It is an object of the present invention to provide a method of the before-mentioned kind by means of which a station can be allocated a logical address in a failsafe manner and without any mechanically operable coding switches being required. In addition, it is an object of the present invention to provide a station of the before-mentioned kind that can be configured using such a method.
This object is achieved by a method as mentioned at the outset, said method comprising the steps of
transmitting the logical address from an address-allocation unit to the station;
transmitting a physical address from the address-allocation unit to said station, said physical address corresponding to an assumed physical position of said station relative to the field bus;
verifying said physical address that has been transmitted to said station based on an actual physical position of said station relative to the field bus; and
storing said transmitted logical address in a memory of said station depending on the verification of said physical address.
The object of the invention is further achieved by a station of the before-mentioned kind that comprises means for verifying a physical address transmitted to it, said means acting upon the memory provided for storing said logical address.
According to the inventive method, the logical address is transmitted to the station in the form of a data value. This may be accomplished via a communication link connected to the station specifically for that purpose. As will be described hereafter in more detail, however, it is also possible to transmit the logical address to the station in the form of a data value directly via the field bus. In any case, there is no need for any mechanically adjustable coding switches. Rather, the logical address can simply be defined by means of software in the address-allocation unit, a process which is known as such. In the simplest of all cases, the address-allocation unit comprises a commercially available computer by means of which the station can be accessed via suitable software. A so-called CMD tool (Configuration Management Diagnosis) available from Phoenix Contakt GmbH and Co. in Blomberg, Germany, is an example of such a software for the Interbus. In addition to the commercially available computer, however, the inventive address-allocation unit may also comprise an adapter unit by means of which the logical address defined by the computer is converted to a data word that can be transmitted via the field bus. In case of the Interbus, for example, the CMD tool is connected to the bus master via a V.24 interface so that in this case the address-allocation unit comprises the bus master and, if applicable, a control unit that may be connected to the latter, in addition to the before-mentioned computer. However, in cases where a commercially available computer, by way of example, is directly coupled to a station, the bus master is not necessarily included in the address-allocation unit.
Due to the fact that a physical address is transmitted to the station in addition to the logical address, said physical address corresponding to the actual physical position of the station relative to the field bus (for example position xe2x80x9c2xe2x80x9d in the field bus), any erroneous allocation of the logical address to an incorrect station (a station located, for example, at position xe2x80x9c3xe2x80x9d) is prevented. This ensures the failsafety necessary for safety-critical processes.
Depending on the verification of the physical address, the transmitted logical address may be stored, for example, in what is known as an EEPROM, i.e. an electronically recordable permanent memory. Corresponding to the inventive method, the inventive station therefore comprises such a memory that can be written to in response to a verification result.
The above features provide the advantage that one can do without the use of mechanical coding switches, whereby the before-mentioned disadvantages connected with such switches are eliminated. The inventive station can therefore be produced at lower cost without any sacrifice with respect to failsafety.
Thus, the object of the invention is perfectly achieved.
According to an especially preferred embodiment of the inventive method, the logical and the physical addresses are transmitted to the station via the field bus.
This feature provides the advantage that the configuration of the station can be effected from a central point even if the respective station is located a long way remote from that central point, which is frequently the case especially with field buses in industrial applications. The configuration of the station is therefore greatly facilitated by the described feature. Furthermore, no additional cabling of the station is required for the implementation of the inventive method. This again helps facilitate the configuration. In principle, transmission of the two before-mentioned addresses can be effected through the field bus, as part of a special configuration mode, with both message-oriented bus systems and I/O-oriented bus systems. However, with the last-mentioned bus systems such transmission can be realized with special ease because they do not require any predefined addresses for the transmission of data. Insofar, the described feature is particularly advantageous for buses with I/O-oriented transmission methods.
According to another preferred embodiment of the inventive method, the logical address and the physical address are transmitted to the station in a common data telegram.
This feature provides the advantage that failsafety is once more increased due to the almost simultaneous transmission. If checking methods, known as such, are used for checking a data telegram, it is thereby prevented that an invalidated logical address may be transmitted in combination with a correct physical address without the station being in a position to detect such a defect. In addition, it is thereby prevented that changes can be made to the bus system between transmission of the logical address and transmission of the physical address, which would again result in an incorrect allocation of addresses.
According to a further preferred embodiment of the inventive method, the station determines its current actual physical position, relative to the field bus, by means of a position-determining unit. A corresponding station is characterized in that the before-mentioned means comprise a position-determining unit for determining an actual physical position of the station relative to the field bus.
This feature provides the advantage that failsafety with respect to the allocation of an address is once more improved due to determining the current physical position of the station. Alternatively and by way of example, it would also be feasible to inform the station about the physical position relative to the field bus envisaged for it in a different way. However, having the position currently determined by means of a position-determining unit guarantees that even inadvertent alterations of the structure of the field bus will be detected so that errors, which may occur in connection with the allocation of addresses, will be detected without any doubt.
According to a further development of the before-mentioned features, the telegram traffic on the field bus is of a circulating nature, and the station determines its actual physical position by counting cyclic events in the circulating telegram traffic. Correspondingly, the position-determining unit of the inventive station comprises a counter for counting cyclic events occurring in the circulating telegram traffic.
This feature provides the advantage that the actual physical position can be determined in a very simple and, nevertheless, reliable way. The reason is that, in case of circulating telegram traffic, the different data packages are handed on successively from one station to the next with the result that waiting times passing until a station receives a start word of the telegram traffic correspond to the position of that station in the order of stations. The waiting time can be determined in a technically very simple manner by counting said cyclic events. Possible cyclic events for this purpose are especially clock pulses by means of which the data traffic is synchronized on the field bus.
According to a further embodiment of the before-mentioned feature, the field bus is an Interbus and the station counts cyclic events during a so-called ID cycle of the Interbus until it encounters the start word of the circulating telegram traffic.
This feature has the advantage that the so-called ID cycle is exactly defined for an Interbus, and, moreover, can be initiated by each station at any time by means of an error message. Therefore, said feature is especially advantageous in connection with an Interbus, since no expensive hardware or software measures are required for determining the actual position of a station, except for a counter in the station. In addition, said feature is fully within the specifications allowed for the Interbus so that an address may be allocated even to individual selected stations without disturbing the overall bus traffic thereby and without interfering with the basic Interbus specifications.
According to a further advantageous development of the before-mentioned features, the station uses an ID cycle initiated by another station, especially a bus master, for the determination of its position.
This feature provides the advantage that the station can determine its actual physical position without influencing the traffic on the Interbus. Thus, the verification can be performed without influencing the other stations connected to the bus. A particularly advantageous solution is achieved if the station determines its position during each ID cycle occurring because any changes occurring on the bus can be determined quickly in this way. As a standard, an ID cycle is performed at least following every startup of the bus.
According to another advantageous embodiment, the station uses for the determination of its position an ID cycle that is initiated by itself after receipt of the physical address.
This feature provides the advantage that the station can verify the physical address received immediately after receipt thereof, whereby any errors are avoided resulting from changes that may have occurred in the bus structure in the meantime. Therefore, said feature provides the advantage that failsafety is further improved.
According to a further development of the inventive method, the physical address is selected as logical address.
This feature provides the advantage that a only single data value needs to be transmitted for carrying out the inventive method, said single data value can be verified by the station based on its actual physical position, and said single data value can then be used by the station as its logical address. Data capacity of the station can therefore be selected correspondingly small.
According to an alternative development of the before-mentioned feature, the logical address is selected independently of the physical address.
This feature provides the advantage that the logical address can be selected based on freely definable criteria so that a much broader variation range is available all in all. In addition, due to said feature it is no longer necessary to reassign addresses within the field bus system when new stations are connected to or separated from the field bus.
It is to be understood that the features recited above and those yet to be explained below can be used not only in the respective combination indicated, but also in other combinations or in isolation, without leaving the context of the present invention. In particular, the invention is not restricted to applications with I/O-oriented field buses, but can be used with all stations that are to be allocated an address.